package cn.jsony.org.mapper;

import cn.jsony.basic.mapper.BaseMapper;
import cn.jsony.org.domain.Employee;
import cn.jsony.org.query.EmployeeQuery;

import java.util.List;

public interface EmployeeMapper extends BaseMapper<Employee> {
    /**
     * 查询所有
     * @return
     */
    List<Employee> loadAll();

    /**
     *
     * 查询单个Employee对象
     * @param id
     * @return
     */
    Employee loadById(Long id);

    /**
     *
     * 新增Employee
     * @param employee
     */
    void save(Employee employee);

    /**
     * 根据id删除Employee
     * @param id
     */
    void remove(Long id);

    /**
     * 修改Employee对象
     * @param employee
     */
    void update(Employee employee);

    /**
     * 查询总条数
     * @param employeeQuery
     * @return
     */
    Integer queryCount(EmployeeQuery employeeQuery);

    /**
     *查询当页条数
     * @param employeeQuery
     * @return
     */
    List<Employee> queryData(EmployeeQuery employeeQuery);

    void addEmployeeRole(Employee employee);

    void delEmployeeRoleByEmpId(Long id);

    Employee loadByLogininfoId(Long id);

    List<Employee> findByShopId(Long id);
}
